package xin.mashibo.pattern.observer;

/**
 * 执行类
 *
 * @author MaShibo
 * 日期 :  2019/1/28
 */
public class Main {


    public static void main(String[] args) {
        NumberGenerator generator = new RandomNumberGenerator();
        Observer observer1 = new DigitObserver();
        Observer observer2 = new GraphObserver();
        generator.addObserver(observer1);
        generator.addObserver(observer2);
        generator.execute();
    }

}
